{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import CoolProp\n",
      "import CoolProp.CoolProp as CP\n",
      "from math import sqrt\n",
      "import numpy as np\n",
      "import matplotlib.pyplot as plt\n",
      "import scipy.optimize\n",
      "%matplotlib inline"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 2
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "Tc = 590.7\n",
      "rhoc = 351\n",
      "b_0 =3.66766530\n",
      "b_1 =-0.210687796\n",
      "b_2 =-0.781330239\n",
      "b_3 =0.130979005\n",
      "b_4 =2.09502491\n",
      "b_5 =6.28891793\n",
      "k_1 =-3.94616949\n",
      "k_2 =5.48487930\n",
      "\n",
      "T = np.array([290,450])\n",
      "tau = Tc/T\n",
      "c_0 = b_0+1\n",
      "c_1 = b_1/(-0.5)\n",
      "c_2 = b_2/(-1.0/6.0)\n",
      "c_3 = b_3/(-1.0/12.0)\n",
      "c_4 = b_4\n",
      "c_5 = b_5\n",
      "R = 8.314472/60.05196\n",
      "cp = R*(c_0+c_1/tau+c_2/tau**2+c_3/tau**3+c_5*(c_4*tau)**2*np.exp(-c_4*tau)/(1-np.exp(-c_4*tau))**2)\n",
      "print cp"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "[ 1.0342473   1.45158917]\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}